package HomeWork.House;

public abstract class HouseModel {
    private String base;
    private String wall;
    private String door;
    private String window;
    private String houseName;

    protected void buildHouse(){
        System.out.println(getHouseName() + "的地基使用的" + getBase());
        System.out.println(getHouseName() + "的墙使用的" + getWall());
        System.out.println(getHouseName() + "的门使用的" + getDoor());
        System.out.println(getHouseName() + "的窗户使用的" + getWindow());
    }

    protected abstract String getBase();
    protected abstract String getWall();
    protected abstract String getDoor();
    protected abstract String getWindow();

    public String getHouseName() {
        return houseName;
    }

    public void setHouseName(String hoseName) {
        this.houseName = hoseName;
    }

    public HouseModel(String houseName){
        this.houseName = houseName;
    }

    public HouseModel() {

    }

    protected HouseModel(String base, String wall, String door, String window) {
        this.base = base;
        this.wall = wall;
        this.door = door;
        this.window = window;
    }

    public String toString() {
        return "HouseModel{base = " + base + ", wall = " + wall + ", door = " + door + ", window = " + window + "}";
    }
}
